<form [formGroup]="form" (ngSubmit)="onSubmit(form,$event)" novalidate>
<mat-card>
  <mat-card-header>
    <mat-card-title>登录</mat-card-title>
  </mat-card-header>
  <mat-card-content>
    <mat-input-container class="full-width">
      <input matInput type="text" placeholder="您的email" formControlName="email">
      <mat-error *ngIf="form.controls['email'].errors['required']">邮箱必填</mat-error>
      <mat-error *ngIf="form.controls['email'].errors['email']">请输入正确的邮箱</mat-error>
    </mat-input-container>
    <mat-input-container class="full-width">
      <input matInput type="password" placeholder="您的密码" autocomplete="off" formControlName="password">
    </mat-input-container>
    <button mat-raised-button type="submit" [disabled]="!form.valid">登录</button>
  </mat-card-content>
  <mat-card-actions class="text-right">
    <p>还没有账户?<a routerLink="/login/register">注册</a></p>
    <p>忘记密码?<a href="">找回</a></p>
  </mat-card-actions>
</mat-card>
  <mat-card>
    <mat-card-header>
      <mat-card-title>每日佳句</mat-card-title>
      <mat-card-subtitle>
        {{quote.cn}}
      </mat-card-subtitle>
    </mat-card-header>
    <img mat-card-image [src]="quote.pic" alt="...">
    <mat-card-content>
      {{quote.en}}
    </mat-card-content>
  </mat-card>
</form>
